home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / Jim's CDEFs v1.30 / demo Source ƒ / demoShell.h < prev    next >
Encoding:
Text File  |  1994-11-06  |  2.5 KB  |  89 lines  |  [TEXT/KAHL]

  1. // -----------------------------------------------------------------------------
  2. //    File    : demoShell.h
  3. //    Date    : October 14, 1994
  4. //    Author    : Jim Stout
  5. //    Purpose    : function prototypes and #define's for demoShell.c
  6. //            :
  7. // -----------------------------------------------------------------------------
  8.  
  9. // Function prototypes
  10.  
  11. void        initToolbox                ( void );
  12. void        getEvents                ( void );
  13. WindowPtr    doNewWindow                (void);
  14. void        doCloseWindow            (WindowPtr theWindow);
  15.  
  16. // Event handling routines 
  17.  
  18. void        doProcessEvents            ( EventRecord *thisEvent );
  19. void        doPeriodicEvent            ( EventRecord *thisEvent );
  20. void        doActivate                ( EventRecord *thisEvent );
  21. void        doDiskInsert            ( EventRecord *thisEvent );
  22. void        doKeyPress                ( EventRecord *thisEvent );
  23. void        doMouseDown                ( EventRecord *thisEvent );
  24. void        doContentClick            ( EventRecord *thisEvent, WindowPtr theWindow);
  25. void        doOSEvent                ( EventRecord *thisEvent );
  26. void        doUpdate                ( EventRecord *thisEvent );
  27. void        doMenuCommand            ( long menuResult );
  28. void        adjustMenus                ( void );
  29. void        disableMenus            (Boolean disable);
  30.  
  31.  
  32. // Utility routines 
  33.  
  34. void        closeAnyWindow            ( WindowPtr window );
  35. Boolean        isAppWindow                ( WindowPtr window );
  36. Boolean        isDAWindow                ( WindowPtr window );
  37. Boolean        isDialogWindow            ( WindowPtr window );
  38. void        invalidateScrollbars    (WindowPtr theWindow);
  39. void        doAlert                    ( short errorNumber, Boolean exit );
  40.  
  41. // a couple of handy macro definitions
  42.  
  43. #define HIWORD(longParam)    (((longParam) >> 16) & 0xFFFF)
  44. #define LOWORD(longParam)    ((longParam) & 0xFFFF)
  45. #define MIN(a, b) ((a) < (b) ? (a) : (b) )
  46.  
  47. // Some resource ids etc.
  48.  
  49. #define kNewWindowID            128
  50. #define rMiscStrings            129
  51. #define    sUntitledTitle            1
  52. #define NIL                        0L
  53. #define MAXLONG                    0x7FFFFFFF
  54.  
  55.  
  56. #define    rAboutAlert                257            // about alert 
  57. #define    rErrorAlert                258            // error user alert 
  58.  
  59. #define rErrorStrings            128
  60. #define    errNeedMacPlus            1
  61. #define    errNeedSys6                2
  62. #define errNeedMultiF            3
  63. #define    errBadRsrc                4
  64.  
  65. #define    rMenuBar                128            // application's menu bar 
  66.  
  67. #define    mApple                    128            // Apple menu 
  68. #define    iAbout                    1
  69.  
  70. #define    mFile                    129            // File menu
  71. #define iClose                    1
  72. #define    iQuit                    2
  73.  
  74. #define    mEdit                    130            // Edit menu 
  75. #define    iUndo                    1
  76. #define iLine21                    2
  77. #define    iCut                    3
  78. #define    iCopy                    4
  79. #define    iPaste                    5
  80. #define    iClear                    6
  81.  
  82. #define    mDemo                    131            // Demo menu
  83. #define    iDemoWind                1
  84. #define iDemoDlog                2
  85. #define iComparePopup            3
  86. #define iDemoTab1                4
  87. #define iDemoTab2                5
  88. #define iDemoTab3                6
  89. #define iDemoTab4                7